package com.example.demo.entity;

import java.io.Serializable;
import java.sql.Date;
import java.util.Objects;

public class Organ implements Serializable {
    private Integer mid;
    private String mname;
    private String marea;
    private Date   mdate;
    private String mtel;
    private String mlevel;
    private String mtype;
    private Integer mcount;

    public Organ(Integer mid, String mname, String marea, Date mdate, String mtel, String mlevel, String mtype, Integer mcount) {
        this.mid = mid;
        this.mname = mname;
        this.marea = marea;
        this.mdate = mdate;
        this.mtel = mtel;
        this.mlevel = mlevel;
        this.mtype = mtype;
        this.mcount = mcount;
    }

    public Organ() {
    }

    public Integer getMid() {
        return mid;
    }

    public void setMid(Integer mid) {
        this.mid = mid;
    }

    public String getMname() {
        return mname;
    }

    public void setMname(String mname) {
        this.mname = mname;
    }

    public String getMarea() {
        return marea;
    }

    public void setMarea(String marea) {
        this.marea = marea;
    }

    public Date getMdate() {
        return mdate;
    }

    public void setMdate(Date mdate) {
        this.mdate = mdate;
    }

    public String getMtel() {
        return mtel;
    }

    public void setMtel(String mtel) {
        this.mtel = mtel;
    }

    public String getMlevel() {
        return mlevel;
    }

    public void setMlevel(String mlevel) {
        this.mlevel = mlevel;
    }

    public String getMtype() {
        return mtype;
    }

    public void setMtype(String mtype) {
        this.mtype = mtype;
    }

    public Integer getMcount() {
        return mcount;
    }

    public void setMcount(Integer mcount) {
        this.mcount = mcount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Organ organ = (Organ) o;
        return Objects.equals(mid, organ.mid) && Objects.equals(mname, organ.mname) && Objects.equals(marea, organ.marea) && Objects.equals(mdate, organ.mdate) && Objects.equals(mtel, organ.mtel) && Objects.equals(mlevel, organ.mlevel) && Objects.equals(mtype, organ.mtype) && Objects.equals(mcount, organ.mcount);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mid, mname, marea, mdate, mtel, mlevel, mtype, mcount);
    }

    @Override
    public String toString() {
        return "Organ{" +
                "mid=" + mid +
                ", mname='" + mname + '\'' +
                ", marea='" + marea + '\'' +
                ", mdate=" + mdate +
                ", mtel='" + mtel + '\'' +
                ", mlevel='" + mlevel + '\'' +
                ", mtype='" + mtype + '\'' +
                ", mcount=" + mcount +
                '}';
    }
}
